package com.adee.java.annotation;

/*
父类AnnotationTest上有MyTargetType注解，MyTargetType是@Inherited的，表示有MyTargetType注解的类在子类也会继承MyTargetType注解
即：父类AnnotationTest有MyTargetType注解，子类AnnotationTestChild也有MyTargetType注解
 */
public class AnnotationTestChild extends AnnotationTest{
    public static void main(String[] args) {
        MyTargetType tt = AnnotationTestChild.class.getAnnotation(MyTargetType.class);
        System.out.println("继承自父类的注解MyTargetType，value=" + tt.value());
    }
}
